package com.imc.beans;

import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 * ImcOrganListId entity. @author MyEclipse Persistence Tools
 */
@Embeddable
public class ImcOrganListId implements java.io.Serializable {

	// Fields

	private Integer uid;
	private Integer organId;

	// Constructors

	/** default constructor */
	public ImcOrganListId() {
	}

	/** full constructor */
	public ImcOrganListId(Integer uid, Integer organId) {
		this.uid = uid;
		this.organId = organId;
	}

	// Property accessors

	@Column(name = "uid", nullable = false)
	public Integer getUid() {
		return this.uid;
	}

	public void setUid(Integer uid) {
		this.uid = uid;
	}

	@Column(name = "organ_id", nullable = false)
	public Integer getOrganId() {
		return this.organId;
	}

	public void setOrganId(Integer organId) {
		this.organId = organId;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof ImcOrganListId))
			return false;
		ImcOrganListId castOther = (ImcOrganListId) other;

		return ((this.getUid() == castOther.getUid()) || (this.getUid() != null
				&& castOther.getUid() != null && this.getUid().equals(
				castOther.getUid())))
				&& ((this.getOrganId() == castOther.getOrganId()) || (this
						.getOrganId() != null && castOther.getOrganId() != null && this
						.getOrganId().equals(castOther.getOrganId())));
	}

	public int hashCode() {
		int result = 17;

		result = 37 * result
				+ (getUid() == null ? 0 : this.getUid().hashCode());
		result = 37 * result
				+ (getOrganId() == null ? 0 : this.getOrganId().hashCode());
		return result;
	}

}